<?
    final class Principio_View_Helper_Messages extends Zend_View_Helper_Abstract
    {
        private function drawList($class, $values)
        {
            if (count($values) > 0)
            {
                $html = "<div class=\"notice ".$class."\"><ul type=\"circle\" style=\"padding-left: 20px;\">";

                foreach ($values as &$message)
                    $html .= "<li>".$message."</li>";

                $html .= "</ul></div>";
            }
            else
                $html = "";

            return $html;
        }


        public function messages()
        {
            return $this->drawList("error", Principio_Common::$error_list).
                $this->drawList("warning", Principio_Common::$warning_list).
                $this->drawList("msg", Principio_Common::$message_list);
        }
    };
?>